import { todoFliterType, todoType } from '../reducer/todo';

export function todoDel(id: number): todoType {
  return {
    type: 'todo/delById',
    payload: id,
  };
}
export function checkById(id: number): todoType {
  return {
    type: 'todo/checkById',
    payload: id,
  };
}
export function changeType(type: todoFliterType): todoType {
  return {
    type: 'todo/changeType',
    payload: type,
  };
}
export function clearCompleted(): todoType {
  return {
    type: 'todo/clearCompleted',
  };
}
export function addTask(value: string): todoType {
  return {
    type: 'todo/addTask',
    payload: value,
  };
}
export function AllCheckReducer(isDone: boolean): todoType {
  return {
    type: 'todo/AllCheck',
    payload: isDone,
  };
}
